home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
4_7.lha
/
4_7
/
4_7d.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
476b
|
24 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <tnode.h>
include <stream.h>
/ print a node's value sorted between
/ its left and right subtrees
tatic void aprnode(tnode *leaf)
if (leaf)
{
aprnode(leaf->left);
cout << leaf->tword << "\n";
aprnode(leaf->right);
}
/ print out the tree alphabetically
oid aprinttree(tree treeheadptr)
aprnode(*treeheadptr);